#ifndef _PORT_H
#define _PORT_H

#include <assert.h>
#define assert_param(expr)  (void)0
#include <FreeRTOS.h>
#define ENTER_CRITICAL_SECTION()    ( __disable_irq())
#define EXIT_CRITICAL_SECTION()     ( __enable_irq())

#include "mbconfig.h"

#define	INLINE                      inline
#define PR_BEGIN_EXTERN_C           extern "C" {
#define	PR_END_EXTERN_C             }

#ifndef TRUE
#define TRUE            1
#endif

#ifndef FALSE
#define FALSE           0
#endif

typedef char            BOOL;
typedef unsigned char   UCHAR;
typedef char            CHAR;

typedef uint16_t USHORT;
typedef int16_t SHORT;

typedef uint32_t ULONG;
typedef int32_t LONG;

/* ----------------------- Prototypes ---------------------------------------*/
void            vMBPortSetWithinException(BOOL bInException);
BOOL            bMBPortIsWithinException(void);
void            vMBMasterTimerSetWithinException(BOOL bInException);
BOOL            bMBMasterTimerIsWithinException(void);

void            vMBPortEnterCritical(void);
void            vMBPortExitCritical(void);


#endif
